package com.jie.jie.mvp.ui;

import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.jaydenxiao.common.base.BaseActivity;
import com.jaydenxiao.common.v.pic.ScalableImageView;
import com.jie.jie.R;

import butterknife.Bind;
import butterknife.OnClick;

public class MeiziActivity extends BaseActivity {


    @Bind(R.id.back_iv)
    ImageView backIv;
    @Bind(R.id.title_tv)
    TextView titleTv;
    @Bind(R.id.meizi_iv)
    ScalableImageView meiziIv;
    @Bind(R.id.activity_meizi)
    LinearLayout activityMeizi;

    @Override
    public int getLayoutId() {
        return R.layout.activity_meizi;
    }

    @Override
    public void initPresenter() {

    }

    @Override
    public void initView() {
        Intent intent = getIntent();
        String url = intent.getStringExtra("url");
        String title = intent.getStringExtra("title");
        titleTv.setText(title);
        titleTv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                meiziIv.reset();
            }
        });
        Glide.with(this).load(url).into(meiziIv);
    }

    @OnClick(R.id.back_iv)
    public void onClick() {
        finish();
    }
}
